// 关于我们
import { ABOUTUS } from './api';
import { request, METHOD } from '@/utils/request';

//添加
export async function addAboutUsApi(params) {
  return request(ABOUTUS + '/create', METHOD.POST, params);
}
//删除
export async function delAboutUsApi(params) {
  return request(ABOUTUS + '/delete/', METHOD.DELETE, params.id);
}
//修改
export async function editAboutUsApi(params) {
  return request(ABOUTUS + '/update/', METHOD.PUT, params);
}
//获取所有
export async function getAboutUsListApi(params) {
  return request(ABOUTUS + '/getAll', METHOD.GET, params);
}
//根据id查找
export async function getAboutUsByIdApi(params) {
  return request(ABOUTUS + '/getById', METHOD.GET, params);
}
export default {
  addAboutUsApi,
  editAboutUsApi,
  delAboutUsApi,
  getAboutUsListApi,
  getAboutUsByIdApi,
};
